package com.zerui.manager.app.accessauthorization;

import com.zerui.cola.dto.PageResponse;
import com.zerui.cola.dto.Response;
import com.zerui.manager.app.accessauthorization.executer.AccessAuthAddCmdExe;
import com.zerui.manager.app.accessauthorization.executer.AccessAuthDeleteCmdExe;
import com.zerui.manager.app.accessauthorization.executer.AccessAuthQryCmdExe;
import com.zerui.manager.app.accessauthorization.executer.AccessAuthUpdateCmdExe;
import com.zerui.manager.web.AccessAuthService;
import com.zerui.manager.web.cmd.AccessAuthAddCmd;
import com.zerui.manager.web.cmd.AccessAuthQryCmd;
import com.zerui.manager.web.cmd.AccessAuthUpdateCmd;
import com.zerui.manager.web.vo.AccessAuthPageVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


/**
 * @Author wh
 * @create_time 2023-08-23 11:08
 */
@Service
public class AccessAuthServiceImpl implements AccessAuthService {

	@Resource
	private AccessAuthAddCmdExe accessAuthAddCmdExe;

	@Resource
	private AccessAuthUpdateCmdExe accessAuthUpdateCmdExe;

	@Resource
	private AccessAuthDeleteCmdExe accessAuthDeleteCmdExe;

	@Resource
	private AccessAuthQryCmdExe accessAuthQryCmdExe;
	@Override
	public Response add(AccessAuthAddCmd accessAuthAddCmd) {
		return accessAuthAddCmdExe.execute(accessAuthAddCmd);
	}

	@Override
	public Response update(AccessAuthUpdateCmd accessAuthUpdateCmd) {
		return accessAuthUpdateCmdExe.execute(accessAuthUpdateCmd);
	}

	@Override
	public Response deleteById(Long id) {
		return accessAuthDeleteCmdExe.execute(id);
	}

	@Override
	public PageResponse<AccessAuthPageVO> getPageList(AccessAuthQryCmd accessAuthQryCmd) {
		return accessAuthQryCmdExe.execute(accessAuthQryCmd);
	}
}
